/**
 * 
 */
package com.xb.cloud.product.merchant.service.client.bo;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @author kexue
 *
 */
public class ProductSkuBo {

	// 基础字段
	private Long id;

	private Long companyId;

	private Long merchantId;

	private Long shopId;

	private Long productId;

	private Byte isCanSale;

	private String cannotSaleReason;

	private Date canSaleTime;

	private String skuNameCn;

	private String skuTitleSub;

	private Byte paymentType;

	private String deliveryDesc;

	private Byte payTimeLimit;

	private Integer saleStartNum;
	
	private Integer totalSaleAmount;

	private Date createTime;
	
	private Date updateTime;
	
	

	// product字段
	private Byte productType;// 类型:0单品，2子品
	private String productUnit;

	// 价格字段
	private BigDecimal priceMarket;
	private BigDecimal priceSale;
	private boolean showOriginalPrice;

	

	// 默认图片
	private String picUrl;

	// 库存
	private Long realStockNum;
	private Long realFrozenStockNum;
	

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getCompanyId() {
		return companyId;
	}

	public void setCompanyId(Long companyId) {
		this.companyId = companyId;
	}

	public Long getMerchantId() {
		return merchantId;
	}

	public void setMerchantId(Long merchantId) {
		this.merchantId = merchantId;
	}

	public Long getShopId() {
		return shopId;
	}

	public void setShopId(Long shopId) {
		this.shopId = shopId;
	}

	public Long getProductId() {
		return productId;
	}

	public void setProductId(Long productId) {
		this.productId = productId;
	}

	public Byte getIsCanSale() {
		return isCanSale;
	}

	public void setIsCanSale(Byte isCanSale) {
		this.isCanSale = isCanSale;
	}

	public String getCannotSaleReason() {
		return cannotSaleReason;
	}

	public void setCannotSaleReason(String cannotSaleReason) {
		this.cannotSaleReason = cannotSaleReason;
	}

	public Date getCanSaleTime() {
		return canSaleTime;
	}

	public void setCanSaleTime(Date canSaleTime) {
		this.canSaleTime = canSaleTime;
	}

	public String getSkuNameCn() {
		return skuNameCn;
	}

	public void setSkuNameCn(String skuNameCn) {
		this.skuNameCn = skuNameCn;
	}

	public String getSkuTitleSub() {
		return skuTitleSub;
	}

	public void setSkuTitleSub(String skuTitleSub) {
		this.skuTitleSub = skuTitleSub;
	}

	public Byte getPaymentType() {
		return paymentType;
	}

	public void setPaymentType(Byte paymentType) {
		this.paymentType = paymentType;
	}

	public String getDeliveryDesc() {
		return deliveryDesc;
	}

	public void setDeliveryDesc(String deliveryDesc) {
		this.deliveryDesc = deliveryDesc;
	}

	public Byte getPayTimeLimit() {
		return payTimeLimit;
	}

	public void setPayTimeLimit(Byte payTimeLimit) {
		this.payTimeLimit = payTimeLimit;
	}

	public Integer getSaleStartNum() {
		return saleStartNum;
	}

	public void setSaleStartNum(Integer saleStartNum) {
		this.saleStartNum = saleStartNum;
	}

	public Byte getProductType() {
		return productType;
	}

	public void setProductType(Byte productType) {
		this.productType = productType;
	}

	public BigDecimal getPriceMarket() {
		return priceMarket;
	}

	public void setPriceMarket(BigDecimal priceMarket) {
		this.priceMarket = priceMarket;
	}

	public BigDecimal getPriceSale() {
		return priceSale;
	}

	public void setPriceSale(BigDecimal priceSale) {
		this.priceSale = priceSale;
	}

	public String getPicUrl() {
		return picUrl;
	}

	public void setPicUrl(String picUrl) {
		this.picUrl = picUrl;
	}

	public Long getRealStockNum() {
		return realStockNum;
	}

	public void setRealStockNum(Long realStockNum) {
		this.realStockNum = realStockNum;
	}

	public Long getRealFrozenStockNum() {
		return realFrozenStockNum;
	}

	public void setRealFrozenStockNum(Long realFrozenStockNum) {
		this.realFrozenStockNum = realFrozenStockNum;
	}

	public Integer getTotalSaleAmount() {
		return totalSaleAmount;
	}

	public void setTotalSaleAmount(Integer totalSaleAmount) {
		this.totalSaleAmount = totalSaleAmount;
	}

	public String getProductUnit() {
		return productUnit;
	}

	public void setProductUnit(String productUnit) {
		this.productUnit = productUnit;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
	public boolean isShowOriginalPrice() {
		if(priceSale == null) {
			return false;
		}
		if(priceMarket == null) {
			return false;
		}
		if(priceMarket.compareTo(priceSale) >0) {
			return true;
		}
		return false;
	}

	public void setShowOriginalPrice(boolean showOriginalPrice) {
		this.showOriginalPrice = showOriginalPrice;
	}
}
